Skip to content

[SNOW-3249917] JDBC removal Step 10c: Remove SFSession from storage stack#1135

Merged
sfc-gh-ggeng merged 1 commit intomasterfrom
jdbc-removal-step10c-remove-session
Apr 6, 2026
Merged

[SNOW-3249917] JDBC removal Step 10c: Remove SFSession from storage stack#1135
sfc-gh-ggeng merged 1 commit intomasterfrom
jdbc-removal-step10c-remove-session

Conversation

@sfc-gh-ggeng
Copy link
Copy Markdown
Contributor

@sfc-gh-ggeng sfc-gh-ggeng commented Apr 2, 2026

Summary

Remove SFSession/SFBaseSession parameters and dead session-based code from the storage client stack. Session was always null from ingest callers — all code behind if (session != null) guards was dead code.

14 files changed, +267/-590 lines (net -323 lines of dead code removed)

Storage clients

  • Remove SFSession/SFBaseSession fields and constructor params
  • Remove dead if (session != null) proxy/headers/permissions blocks (keep sessionless path)
  • Remove dead renewExpiredToken() calls
  • Simplify getMaxRetries() to return default 25 (no session property lookup)
  • Replace session.isOwnerOnlyStageFilePermissionsEnabled() with false

Interface + strategies

  • SnowflakeStorageClient: remove SFSession from all method signatures
  • GCSAccessStrategy/GCSAccessStrategyAwsSdk/GCSDefaultAccessStrategy: remove SFSession
  • StorageClientFactory: remove SFSession/SFBaseSession params

Agent + config

  • SnowflakeFileTransferAgent: remove session from getStageInfo(), pushFileToRemoteStore(), compress methods. Remove dead renewExpiredToken(), parseCommandInGS(), getLocalFilePathFromCommand().
  • SnowflakeFileTransferConfig: remove SFSession field/getter/setter

Import cleanup

  • SnowflakeSQLException, SnowflakeSQLLoggedException, TelemetryEvent: remove now-unused SFBaseSession/SFSession imports

Remaining (next PR — #1136)

2 SFSession imports remain: SnowflakeSQLLoggedException (constructor params), TelemetryClient (session-based code). Handled in Step 10c2.

Test plan

  • mvn compiler:compile passes
  • CI passes

🤖 Generated with Claude Code

@sfc-gh-ggeng sfc-gh-ggeng requested review from a team as code owners April 2, 2026 06:07
@sfc-gh-ggeng sfc-gh-ggeng force-pushed the jdbc-removal-step10c-remove-session branch from 553fdbb to dbce69a Compare April 2, 2026 09:14
@sfc-gh-ggeng sfc-gh-ggeng force-pushed the jdbc-removal-step10b-swap-remaining branch from b5ccf78 to 72f5e83 Compare April 2, 2026 09:14
@sfc-gh-ggeng sfc-gh-ggeng force-pushed the jdbc-removal-step10c-remove-session branch from dbce69a to a78295d Compare April 2, 2026 19:56
@sfc-gh-ggeng sfc-gh-ggeng force-pushed the jdbc-removal-step10b-swap-remaining branch from 72f5e83 to 0cd4046 Compare April 2, 2026 19:56
Base automatically changed from jdbc-removal-step10b-swap-remaining to master April 2, 2026 21:49
…tack

Remove SFSession/SFBaseSession parameters and dead session-based code
from the storage client stack. Session was always null from ingest callers.

Storage clients (SnowflakeS3Client, SnowflakeAzureClient, SnowflakeGCSClient):
- Remove SFSession/SFBaseSession fields and constructor params
- Remove dead `if (session != null)` proxy/headers/permissions blocks
  (keep sessionless path)
- Remove dead `if (session != null) { renewExpiredToken(...) }` blocks
- Simplify getMaxRetries() to return default (no session property lookup)
- Replace session.isOwnerOnlyStageFilePermissionsEnabled() with false

Interface + strategies:
- SnowflakeStorageClient: remove SFSession from all method signatures
- GCSAccessStrategy/GCSAccessStrategyAwsSdk/GCSDefaultAccessStrategy:
  remove SFSession from constructors and handleStorageException
- StorageClientFactory: remove SFSession/SFBaseSession params

Agent + config:
- SnowflakeFileTransferAgent: remove session from getStageInfo(),
  pushFileToRemoteStore(), compressStreamWithGZIP/NoDigest().
  Remove dead renewExpiredToken(), parseCommandInGS(),
  getLocalFilePathFromCommand() methods.
- SnowflakeFileTransferConfig: remove SFSession field, getter, setter

Remaining SFSession imports (3): SnowflakeSQLLoggedException (constructor
params), TelemetryClient (session-based code) — to be handled next.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sfc-gh-ggeng sfc-gh-ggeng force-pushed the jdbc-removal-step10c-remove-session branch from a78295d to 8637890 Compare April 6, 2026 22:12
@sfc-gh-ggeng sfc-gh-ggeng merged commit 57ce4ac into master Apr 6, 2026
47 of 52 checks passed
@sfc-gh-ggeng sfc-gh-ggeng deleted the jdbc-removal-step10c-remove-session branch April 6, 2026 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants